home *** CD-ROM | disk | FTP | other *** search
- /* graphics:
- debugging routines
- by Cary Clark, Georgiann Delaney, Michael Fairman, Dave Good, Robert Johnson, Keith McGreggor, Oliver Steele, David Van Brink, Chris Yerga
- Copyright 1987 - 1991 Apple Computer, Inc. All rights reserved. */
-
- #pragma once
- #ifndef graphicsDebuggingIncludes
- #define graphicsDebuggingIncludes
- #ifndef graphicsTypesIncludes
- #include "graphics types.h"
- #endif
-
- typedef enum {
-
- /* These levels tell how to validate routines. Choose one. */
- gxNoValidation = 0x00, /* no validation */
- gxPublicValidation = 0x01, /* check parameters to public routines */
- gxInternalValidation = 0x02, /* check parameters to internal routines */
-
- /* These levels tell how to validate types. Choose one. */
- gxTypeValidation = 0x00, /* check types of objects */
- gxStructureValidation = 0x10, /* check fields of private structures */
- gxAllObjectValidation = 0x20, /* check every object over every call */
-
- /* These levels tell how to validate memory manager blocks. Choose any combination. */
- gxNoMemoryManagerValidation = 0x0000,
- gxApBlockValidation = 0x0100, /* check the relevant block structures after each memory mgr. call */
- gxFontBlockValidation = 0x0200, /* check the system gxHeap as well */
- gxApHeapValidation = 0x0400, /* check the memory manager’s gxHeap after every mem. call */
- gxFontHeapValidation = 0x0800, /* check the system gxHeap as well */
- gxCheckApHeapValidation = 0x1000, /* check the memory manager’s gxHeap if checking routine parameters */
- gxCheckFontHeapValidation = 0x2000 /* check the system gxHeap as well */
-
- } gxValidationLevels;
-
- typedef long gxValidationLevel;
-
- typedef enum {
- no_draw_error,
-
- /* gxShape type errors */
- shape_emptyType,
- shape_inverse_fullType,
- rectangle_zero_width,
- rectangle_zero_height,
- polygon_empty,
- path_empty,
- bitmap_zero_width,
- bitmap_zero_height,
- text_empty,
- glyph_empty,
- layout_empty,
- picture_empty,
-
- /* general gxShape errors */
- shape_no_fill,
- shape_no_enclosed_area,
- shape_no_enclosed_pixels,
- shape_very_small,
- shape_very_large,
- shape_contours_cancel,
-
- /* gxStyle errors */
- pen_too_small,
- text_size_too_small,
- dash_empty,
- start_cap_empty,
- pattern_empty,
- textFace_empty,
- shape_primitive_empty,
- shape_primitive_very_small,
-
- /* gxInk errors */
- transfer_equals_noMode,
- transfer_matrix_ignores_source,
- transfer_matrix_ignores_device,
- transfer_source_reject,
- transfer_mode_ineffective,
- colorSet_no_entries,
- bitmap_colorSet_one_entry,
-
- /* gxTransform errors */
- transform_scale_too_small,
- transform_map_too_large,
- transform_move_too_large,
- transform_scale_too_large,
- transform_rotate_too_large,
- transform_perspective_too_large,
- transform_skew_too_large,
- transform_clip_no_intersection,
- transform_clip_empty,
- transform_no_viewPorts,
-
- /* gxViewPort errors */
- viewPort_disposed,
- viewPort_clip_empty,
- viewPort_clip_no_intersection,
- viewPort_scale_too_small,
- viewPort_map_too_large,
- viewPort_move_too_large,
- viewPort_scale_too_large,
- viewPort_rotate_too_large,
- viewPort_perspective_too_large,
- viewPort_skew_too_large,
- viewPort_viewGroup_offscreen,
-
- /* gxViewDevice errors */
- viewDevice_clip_no_intersection,
- viewDevice_scale_too_small,
- viewDevice_map_too_large,
- viewDevice_move_too_large,
- viewDevice_scale_too_large,
- viewDevice_rotate_too_large,
- viewDevice_perspective_too_large,
- viewDevice_skew_too_large
- } gxDrawErrors;
-
- typedef long gxDrawError;
-
- typedef boolean (*gxUserDebugFunction)(const char *str, long message, long reference);
-
- #ifdef appleInternal
- #define GXInlineCode(x)
- #endif
- #ifndef GXInlineCode
- #define GXInlineCode(x) = {0x303C, x, 0xA832}
- #endif
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- gxDrawError GXGetShapeDrawError(gxShape source) GXInlineCode(0x1173);
-
- void GXValidateAll(void) GXInlineCode(0x117E);
- void GXValidateColorSet(gxColorSet) GXInlineCode(0x1174);
- void GXValidateColorProfile(gxColorProfile) GXInlineCode(0x1175);
- void GXValidateGraphicsClient(gxGraphicsClient) GXInlineCode(0x3006);
- void GXValidateInk(gxInk) GXInlineCode(0x1176);
- void GXValidateShape(gxShape) GXInlineCode(0x1177);
- void GXValidateStyle(gxStyle) GXInlineCode(0x1178);
- void GXValidateTag(gxTag) GXInlineCode(0x1179);
- void GXValidateTransform(gxTransform) GXInlineCode(0x117A);
- void GXValidateViewDevice(gxViewDevice) GXInlineCode(0x117B);
- void GXValidateViewPort(gxViewPort) GXInlineCode(0x117C);
- void GXValidateViewGroup(gxViewGroup) GXInlineCode(0x117D);
-
- gxValidationLevel GXGetValidation(void) GXInlineCode(0x2011);
- void GXSetValidation(gxValidationLevel) GXInlineCode(0x2012);
-
- long GXGetValidationError(char *procedureName, void **argument, long *argumentNumber) GXInlineCode(0x1244);
- boolean GXGetGraphicsBugParametersPointer(struct graphicsBugParameters **blockPointer) GXInlineCode(0x125C);
- gxUserDebugFunction GXGetUserGraphicsDebug(long *reference) GXInlineCode(0x3018);
- void GXSetUserGraphicsDebug(gxUserDebugFunction userFunction, long reference) GXInlineCode(0x3019);
-
- #ifdef __cplusplus
- }
- #endif
-
- #undef GXInlineCode
-
- #endif
-